<template>
  <div class="home">
     <el-container >
      <el-aside >
        <el-menu>
          <!-- 默认打开1和2 -->
          <el-submenu index="1">
            <template slot="title"
              ><i class="el-icon-message"></i><router-link to="/home/all">主页</router-link></template
            >
          </el-submenu>
          <el-submenu index="2">
            <template slot="title"
              ><i class="el-icon-menu"></i><router-link to="/home/hao">单独的路由</router-link></template
            >
          </el-submenu>
          <el-submenu index="3">
            <template slot="title"
              ><i class="el-icon-setting"></i><router-link to="/https://www.baidu.com/">外链</router-link></template
            >
          </el-submenu>
            <el-submenu index="4">
        <template slot="title">二级菜单</template>
        <el-menu-item-group>
          <template slot="title">分组一</template>
          <el-menu-item index="2-1">选项1</el-menu-item>
          <el-menu-item index="2-2">选项2</el-menu-item>
        </el-menu-item-group>
        <el-menu-item-group title="分组2">
          <el-menu-item index="2-3">选项3</el-menu-item>
        </el-menu-item-group>
        <el-submenu index="2-4">
          <template slot="title">选项4</template>
          <el-menu-item index="2-4-1">选项4-1</el-menu-item>
        </el-submenu>
      </el-submenu>
        </el-menu>
      </el-aside>
      <!-- 主体 -->
      <router-view></router-view>
    </el-container>
  
  </div>
</template>

<script>

export default {
  name: "Home",
  data(){
    return{}
  },
  mounted(){
     console.log(this);
  },
  methods:{
    
  }
};
</script>
<style scoped>
    
.el-aside{
    background: #000;
}
.el-submenu__title a{
  color: #000;
  text-decoration: none;
}
.el-submenu{
  background: rgba(255,255,255,.3);
}
</style>
